package com.beijiteshop.shop.ui.order.repo

import com.beijiteshop.libcommon.network.repo.BaseRepo
import com.beijiteshop.shop.model.api.request.AddCartOrderRequest
import com.beijiteshop.shop.model.api.request.CartOrderInfoRequest
import com.beijiteshop.shop.model.api.request.OrderRequest
import com.beijiteshop.shop.model.api.request.RefundRequest

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/9 14:19
 * @Description
 */
class OrderRepo(private val service: OrderService) : BaseRepo() {

    fun getOrderInfo(goodId: String) = service.getOrderInfo(goodId)

    fun commitOrder(request: OrderRequest) = service.commitOrder(request)

    fun getOrderList(page: Int,status: Int? = null) = service.getOrderList(page, status)

    fun getOrderDetailInfo(orderId: String) = service.getOrderDetailInfo(orderId)

    fun getOrderPayInfo(orderNum: String) = service.getOrderPayInfo(orderNum)

    fun requestRefund(request: RefundRequest) = service.requestRefund(request)

    fun getCartOrderInfo(request: CartOrderInfoRequest) = service.getShopCartOrderInfo(request)

    fun addCartOrder(request: AddCartOrderRequest) = service.addCartOrder(request)
}